import Vue from 'vue'
import Toasted from 'vue-toasted';

Vue.use(Toasted)

export class Toast {
	constructor() {
	}

	success(message, options = {}) {
		return Vue.toasted.success(message, {duration: 2000, ...options, position: 'top-center'})
	}

	error(message, options = {}) {
		return Vue.toasted.error(message, {duration: 2000, ...options, position: 'top-center'})
	}
}

export default new Toast();